name,year = "张三",50
print(name,"的年龄有",year,"岁了。")
print("{}的年龄有{}岁了。".format(name,year))
print("{name}的年龄有{year}岁了。".format(name="张三",year=50))
print("%s的年龄有%d岁了。"%(name,year))
print(f"{name}的年龄有{year}岁了。")


print('------------------------------')
s1='qwer1234'
print(s1)#qwer1234
print(s1[3])#r
print(s1[::-1])#4321rewq
print(s1[1:9])#wer1234
print(s1[5:1:-1])#21re

print('q'in s1)
print("8" not in s1)


#a=input("性别：")

#if a!='男':

 # print("你的性别是女性")

#else:

  #print("你的性别是",a)


a = "15.35"


c=float(a)
print(c,type(c))
print(type(a))

name="里斯"
year=90
print("姓名",name,"年龄",year,sep="|")
print(100,end=" ")
print(100,end=" ")
print(100)

print(100)
print(100)
print(100)


s1='123456789'
print(len(s1))

s2='o'
print(ord(s2))

s3=111
print(chr(s3))

s4=20
print(eval('s4*4+4'))

'''
s1.title()
s1.upper()
s1.lower()
s1.rstrip()
s1.lstrip()
s1.strip()
s1.find()#打印其第一个相同字母的下标
s1.idex()
s1.replace()#替换
s1.split()#通过指定的标识符进行分割
s1.startswith()
s1.endswith()
s1.count()#计算字符出现次数
s1.isalpha()#是否都为字母
s1.isdigit()#是否都为数字
s1.isalnum()#是否都为字母或数字
','.join(s1)#将元素以指定的字符连接成一个新的字符
'''


a=30
b=20
if a>b:
    print("a>b")
else:
    print("a<b")




a=float(input("你的分数是："))
if a >= 0 and a <= 100:
    if a >= 90:
        print("成绩优秀")
    elif a >= 70:
        print("成绩良好")
    elif a >= 60:
        print("成绩及格")
    else:
        print("不及格")
else:
    print("输入错误")



n=1000
sum=0
number=1
while number<=1000:
    sum=sum+number
    number+=1
    print(number)
print(f"number为{number},1到1000的总和为{sum}")

print('------------------')
list1 = list("hello")
print(list1)

a=list("123sdfghjk")
print(a)

